from django.conf import settings
from django.db.models import signals
from django.utils.translation import ugettext as _

if "notification" in settings.INSTALLED_APPS:
    from notification import models as notification

    def create_notice_types(app, created_models, verbosity, **kwargs):
        notification.create_notice_type("answer_on_your_question", _("Answer on your question"), _("an answer was left for your question"), default=2)
        notification.create_notice_type("answer_accepted", _("Answer accepted"), _("your answer was accepted"), default=2)
#        notification.create_notice_type("you_question_stared", _("Question stared"), _("your question was stared"), default=1)

    signals.post_syncdb.connect(create_notice_types, sender=notification)
else:
    print "Skipping creation of NoticeTypes as notification app not found"
